﻿using System;

using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;


namespace Win32
{
    public static class CoreDLL
    {
        [DllImport("CoreDLL.dll")]
        public static extern int CeRunAppAtTime(string application, SystemTime startTime);
        [DllImport("CoreDLL.dll")]
        public static extern int CeRunAppAtEvent(string application, int EventID);

        [DllImport("CoreDLL.dll")]
        public static extern int FileTimeToSystemTime(ref long lpFileTime, SystemTime lpSystemTime);
        [DllImport("CoreDLL.dll")]
        public static extern int FileTimeToLocalFileTime(ref long lpFileTime, ref long lpLocalFileTime);


        [DllImport("CoreDLL")]
        public static extern IntPtr CreateMutex(IntPtr SecurityPtr, bool initialOwner, string name);
        [DllImport("CoreDLL")]
        public static extern IntPtr ReleaseMutex(IntPtr mutexHandle);
        [DllImport("CoreDLL.dll")]
        public static extern IntPtr CreateEvent(IntPtr alwaysZero, bool manualReset, bool initialState, string name);
        [DllImport("CoreDLL.dll")]
        public static extern int WaitForSingleObject(IntPtr handle, int waitTimeInMilliseconds);
        [DllImport("CoreDLL.dll")]
        private static extern int EventModify(IntPtr handle, int eventAction);
        [DllImport("CoreDLL.dll")]
        public static extern int CloseHandle(IntPtr handle);
    }
}
